package com.fyyg.common.result;

import com.alibaba.fastjson.JSON;

/**
 * 返回结果
 * @author hang.ouyang
 *
 * @date 2016年3月18日 上午10:31:29
 */
public class ResultInfo {

    private String code;
    private String message;
    private Object data;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public ResultInfo() {
    }

    
    public ResultInfo(String code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    /**
     * 将对象转为json格式
     * @return
     */
    public String ConversionJSON(ResultInfo res) {
    	return JSON.toJSONString(res);
    }

}
